package com.vf.admin.client.dao;

import com.vf.admin.common.db.BaseDao;
import com.vf.admin.common.splitpage.SplitPageBean;
import com.vf.admin.miaodong.entity.AppCzMoney;
import com.vf.admin.utils.StringEx;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * 钻石充值表
 */
@Repository
public class AppCzMoneyDao extends BaseDao<AppCzMoney> {

    /**
     * 查询列表
     */
    public List<AppCzMoney> findList() {
        ArrayList<Object> paramList = new ArrayList<Object>();
        StringBuilder sbStr = new StringBuilder("select * from app_cz_money where 1=1  ");
        sbStr.append(" and state = 1 ");
        sbStr.append(" order by money asc");
        String sql = sbStr.toString();
        return this.queryList(sql,paramList, AppCzMoney.class,null);
    }

    /**
     * 详情
     */
    public AppCzMoney get(Integer id) {
        if (id==null || id<=0) {
            return null;
        }
        List<Object> paramList = new ArrayList<Object>();
        StringBuilder sbStr = new StringBuilder("select * from app_cz_money where id = ? ");
        paramList.add(id);
        String sql = sbStr.toString();
        return this.queryObj(sql, paramList, AppCzMoney.class);
    }
    
}
